<#assign imagename_id="">
<#if parameters.showButton!true>
	<#assign imagename_id=(parameters.id) + "_name">
</#if>

<#assign preview_id="">
<#if parameters.showPreview!true>
	<#assign preview_id=(parameters.id) + "_preview">
</#if>

<input type="hidden" id="${parameters.id}" name="${parameters.name}" value="${parameters.value!""}"/>
<input name="${parameters.name}_name" id="${imagename_id}" readonly="true" class="${parameters.cssClass!""}" style="${parameters.style!""}" value="${parameters.tranlateValue!""}" onclick='uploadImg("${parameters.id}", "${imagename_id}", "${preview_id}");' />
<#if (parameters.showButton)>
<a class="btnAttach" href="javascript:void(0)" onclick='uploadImg("${parameters.id}", "${imagename_id}", "${preview_id}");'></a>
<a class="btnDel" href="javascript:void(0)"  onclick='delImg("${parameters.id}", "${imagename_id}", "${preview_id}");'></a>
</#if>
<br/>

<#if (parameters.showPreview)>
<p class="nowrap">
	<label>图片预览:</label>
	<#if (parameters.value?? && parameters.value != "")>
		<img id="${preview_id}" src="${parameters.ctx}/download.action?attachId=${parameters.value}"/>
	<#else>
		<img id="${preview_id}" src="${parameters.ctx}/images/qiuzhenxian.jpg"/>
	</#if>
</p>
</#if>